<?php


/**
 * Class Involved_RechargeRecordModel
 */

class Involved_RechargeRecordModel extends BaseModel
{

    protected $table = 'recharge_record';

    /**
     * 获取充值记录列表
     */
    public function RechargeRecordList(){
        return  DB::table($this->table)
            ->selectRaw('ypt_recharge_record.rechar_id,ypt_recharge_record.rechar_money,ypt_recharge_record.bank,ypt_recharge_record.oper_time,ypt_recharge_record.status,ypt_user.user_name as user_id')
            ->leftjoin('user','recharge_record.user_id','=','user.user_id')
            ->get();
    }


    /**
     * 获取充值记录列表
     */
    public function GetRechargeRecordOne($id){
        return  DB::table($this->table)
            ->where('recharge_record.rechar_id',$id)
            ->first();
    }
}